<template>
	<view class="page_1">
		<!-- 收货地址 -->
		<view class="address_box" v-if="typelist[delivery_method].id" @click="open(1)">
			<image class="address_bj" src="../../static/tit.png"></image>
			<image src="../../static/address.png"></image>
			<view class="text" v-if="delivery_method==0&&order[0]">
				<view class="user_info"><view class="namebox">{{ order[0].shouhuoren }}</view><view>{{ order[0].mobile }}</view></view>
				<view class="address">{{ order[0].province }} {{ order[0].city }} {{ order[0].town }} {{ order[0].street }}</view>
			</view>
			<view v-if="order.length==0&&delivery_method==0">选择地址</view>
			<view  v-if="delivery_method==1">
				{{seftpick}}
			</view>
		</view>
		<view class="address_box" v-else @click="open(1)">
			<image class="address_bj" src="../../static/tit.png"></image>
			<image src="../../static/address.png"></image>
			<view>选择地址</view>
		</view>
		<!-- 自提门店信息 -->
		<!-- <view class="store_box">
			<view class="top">
				<image src="@/static/image/position.png"></image>
				<view class="text">
					<view class="store_info"><text>门店名称</text><text>13876263500</text></view>
					<view class="address">江西省 南昌市 西湖区 朝阳洲桃花一村</view>
				</view>
			</view>
			<view class="line"></view>
			<view class="time_btn">
				<view class="tiem">营业时间：10:00-20:30</view>
				<view class="btn" @click="showEwm">出示自提码</view>
			</view>
		</view> -->

		<!-- 商品信息 -->
		<view class="goods_status">
			<!-- <view class="number">
				<view class="left"><text>订单编号：</text><text>{{ order.order_sn }}</text></view>
				<view class="right"></view>
			</view> -->
			<view class="info" v-for="(ite, inde) in orderlist" :key="inde">
				<image :src="ite.goods_images[0].full_url"></image>
				<view class="title">
					<view class="title_item">
						<view class="title_left">{{ ite.goods_name }}</view>
						<view class="title_right"  v-if="orderlist[0].info.jifen==true">
							<text>{{ ite.info.unit_price }}积分</text>
							<text>X{{ ite.info.goods_num[0] }}</text>
						</view>
						<view class="title_right"  v-else>
							<text>￥{{ ite.info.unit_price }}</text>
							<text>X{{ ite.info.goods_num[0] }}</text>
						</view>
					</view>
					<view class="small_title">
						<text v-for="(item,index) in ite.specname[0].goods_props" :key="index">
							{{item.group.name}}:{{item.value.name}}
						</text>
					</view>
				</view>
			</view>
			<view class="price" v-if="is_supermarket==1">
				<view>配送方式</view>
				<picker class="tipname" :range="typelist" range-key="title" @change="hangletype">
					{{delivery_method==null?'请选择':typelist[delivery_method].title}}
				</picker>
			</view>
			<view class="price">
				<view>买家留言</view>
				<input class="tipname" placeholder="有需要可以留言"></input>
			</view>
		</view>

		<!-- 订单信息 -->
		<view class="order_info">
			<view class="flex" >
				<view class="left">商品金额</view>
				<view class="right" style="color: #F94D29;">￥{{finalpaymoney}}
				</view>
			</view>
			<view class="flex">
				<view class="left">运费</view>
				<view class="right">{{freight_money||0}}</view>
			</view>
		</view>
		<!-- 订单优惠卷 -->
		<view class="order_info">
			<view class="flex" >
				<view class="left">商品券/店铺券</view>
				<view class="right"  v-if="couponlist" @click="open(2)">
					<view style="color: #F94D29;" v-if="couponinfo.coupon_type">
						<text v-if="couponinfo.coupon_type==1">-￥{{couponinfo.coupon_money}}</text>
						<text v-if="couponinfo.coupon_type==3">-￥{{couponinfo.coupon_money}}</text>
						<text v-if="couponinfo.coupon_type==2">{{couponinfo.discount_percent/10}}折</text>
					</view>
					<!-- <view style="color: #F94D29;" v-if="couponinfo.coupon_money">-￥{{couponinfo.coupon_money}}</view> -->
					<view class="rollup" v-else >{{couponlong}}张可用
					</view>
					
					<image src="../../static/jt.png"></image>
				</view>
				
			</view>
			<view class="flex">
				<view class="left">会员抵扣</view>
				<view class="right" style="color: #F94D29;">￥0.00</view>
			</view>
		</view>
		<view class="paybox">
			<view class="titlebox">支付方式</view>
			<view class="paylist" v-for="(item,index) in paytype" :key="index" @click="handlepay(item)">
				<view class="right">
					<image :src="item.img"></image>
					{{item.title}}<text style="color: #F94D29;" v-if="index==0">{{myinfo.balance||0}}</text>
					<text style="color: #F94D29;" v-if="index==1">{{myinfo.wx_balance||0}}</text>
				</view>
				<image v-if="typeindex==item.id" src="../../static/gou.png"></image>
				<image v-else src="../../static/yuan.png"></image>
			</view>
		</view>
		<uni-popup ref="popup" type="bottom">
			<pickup v-if="modelindex==1&&is_supermarket==0" :addresslist="addresslist" @close="close" @addressid="addressid" :seftpick="seftpick"
			 :currone="typelist[delivery_method].id" @deliverymethod="deliverymethod"></pickup>
			 <selfpick v-if="modelindex==1&&is_supermarket==1" :addresslist="addresslist" @close="close" @addressid="addressid" :seftpick="seftpick"
			  :currone="typelist[delivery_method].id" @deliverymethod="deliverymethod"></selfpick>
			 <coupon @handlecoupon="handlecoupon" @close="close" v-if="modelindex==2" :list="couponlist"></coupon>
		</uni-popup>
		<view style="height: 120rpx;"></view>
		<!-- 底部按钮 -->
		<view class="down_box">
			<view class="total">合计: 
					<text>￥</text>
					<text style="font-size: 38rpx;margin-right: 10rpx;" >{{totalPrice}}</text>
					<text  v-if="orderlist[0].info.jifen==true">积分</text>
					<!-- <text style="color: #888888;text-decoration: line-through;">￥160,000</text> -->
			</view>
			<view  v-if="orderlist[0].info.jifen==true" class="btn" @click="pay">确认兑换</view>
			<view v-else class="btn" @click="pay">确认支付</view>
		</view>

		<!-- 遮罩层 -->
	</view>
</template>

<script>
	import pickup from '../../components/pickup.vue'
	import coupon from '../../components/coupon.vue'
	import selfpick from '../../components/selfpick.vue'
	export default {
		components: { pickup,coupon,selfpick },
		data() {
			return {
				// 二维码是否显示
				isShowEwm: false,
				id: null,
				order: null,
				orderlist: [], //订单列表api/Wechat/getCouponByOrder
				typelist: [{
					id: 1,
					title: '快递'
				}, {
					id: 2,
					title: '自提'
				}],
				delivery_method: null,
				address_id:'',
				addresslist:[],
				seftpick:'',
				isIntegral:null,
				fd:false,//防抖
				myinfo:{},
				couponlist:[],//优惠卷列表
				couponlong:"",//优惠卷数量
				modelindex:'',//弹窗类型 1为地址，2为优惠卷
				paytype:[{img:'../../static/dou.png',title:'优生活余额支付',id:3},{img:'../../static/ye.png',title:'账户余额支付',id:4},
			{img:'../../static/wx1.png',title:'微信支付',id:2}],//支付类型列表1积分支付 2微信支付  3POS余额支付 4账户余额支付
				typeindex:null,//支付索引
				couponinfo:{},//选择的优惠卷信息
				coupon_id:'',//优惠卷id
				freight_money:0,//配送费
				uu_id:'',
				is_supermarket:0,
				goods_ids:[],
			};
		},
		onLoad(option) {
			console.log(option.list,'option123',option,option.is_supermarket,this.is_supermarket)
			if(option.is_supermarket){
				// this.is_supermarket = option.is_supermarket
			}
			// this.orderlist = option.list
			this.orderlist = (JSON.parse(decodeURIComponent(option.list)))
			this.orderlist.map(item => {
				if(item.spec_type==20&&!item.specname){
					item.specname = item.skuList.filter(sitem=>sitem.goods_sku_id==item.info.spec_id)
					item.specname[0].goods_props = JSON.parse(item.specname[0].goods_props)
					// console.log(item.specname[0],item.specname[0].goods_props)
				}
			})
			this.getcouopn()
			// console.log(this.orderlist,option.list)
			// this.getaddress()
			// this.getseltpickup()
		},
		onShow() {
			this.getaddress()
			this.getinfo()
			// this.getseltpickup()
			
		},
		computed: {
			// /计算选中商品的总价
			totalPrice() {
				let totalPrice = 0;
				this.orderlist.map(item => {
					totalPrice += item.info.goods_num[0] * item.info.unit_price
				})
				if(this.couponinfo.coupon_type==1){
					totalPrice = totalPrice - (parseFloat(this.couponinfo.coupon_money)||0)
				}
				if(this.couponinfo.coupon_type==2){
					totalPrice = totalPrice * (parseFloat(this.couponinfo.discount_percent/100)||0)
				}
				if(this.couponinfo.coupon_type==3){
					totalPrice = totalPrice - (parseFloat(this.couponinfo.coupon_money)||0)
				}
				// if(this.couponinfo.coupon_money>0){
				// 	totalPrice = totalPrice-this.couponinfo.coupon_money
				// }
				totalPrice = totalPrice + parseFloat(this.freight_money)
				return parseFloat((totalPrice).toFixed(2)) // 保留小数点后2位
			},
			finalpaymoney(){
				let finalpaymoney = 0;
				this.orderlist.map(item => {
					finalpaymoney += item.info.goods_num[0] * item.info.unit_price
				})
				return parseFloat(finalpaymoney.toFixed(2)) // 保留小数点后2位
			}
		},
		filters: {
			statusFilter(val) {
				let arr = ['待付款', '待发货', '待收货', '待评价', '已取消', '售后退款中', '已完成', '售后完成']
				return arr[val]
			}
		},
		methods: {
			//选择配送方式
			hangletype(e) {
				this.delivery_method = e.detail.value
				if(this.typelist[this.delivery_method].id==1&&!this.address_id){
					this.order = this.addresslist.filter(item => item.isdefault==1)
					this.address_id = this.order[0].id
					console.log(this.order)
				}else{
					// this.order=null
				}
			},
			//获取配送费
			getfee() {
				this.$http({
					url: 'api/Wechat/getShippingFee',
					data: {
						merch_id: this.orderlist[0].store_id,//商家id
						address_id:this.address_id,//用户地址id
					}
				}).then(res=>{
					this.freight_money = res.data.freight_money
					this.uu_id = res.data.uu_id
				})
			},
			cancelDone() {
				uni.showToast({
					title: '取消成功',
					icon: 'success',
					mask: true
				})
				this.getOrderInfo()
			},
			cancelOrder() {
				this.$refs.cancel.open(this.order.id)
			},
			getinfo(){
				this.$http({
					url:'api/wechat/userinfo',
				}).then(res=>{
					this.myinfo = res.data
				})
			},
			//获取选择的优惠卷信息
			handlecoupon(result){
				console.log(result,'result')
				if(result.id){
					this.couponinfo = result
					this.coupon_id =''
					this.coupon_id = result.id
				}else{
					this.couponinfo = {}
					this.coupon_id =''
				}
			},
			//创建订单 navOrderDatails
			pay() {
				 //是否代理商字段 is_agent 0否 1是 
				 // if(this.myinfo.is_agent==1&&this.totalPrice<=0){
					//  uni.showToast({
					//  	title:'未设置代理价',
					//  	icon:'none'
					//  })
					//  return
				 // }
				if(this.delivery_method==null){
					uni.showToast({
						title:'请选择配送方式',
						icon:'none'
					})
					return
				}else{
					//配送方式 1快递 2自提
					if(this.typelist[this.delivery_method].id==1&&!this.address_id){
						uni.showToast({
							title:'请选择地址',
							icon:'none'
						})
						return
					}
				}
				if(this.typeindex==null){
					 uni.showToast({
						title:'请选择支付方式',
						icon:'none'
					 })
					 return
				}
				
				const goods_id = []
				const spec_id=[]
				const goods_num=[]
				const goods_price=[]
				this.isIntegral = false
				this.orderlist.forEach((item) => {
					if(item.is_points_discount==1){
						this.isIntegral = true
					}
					goods_id.push(item.id)
					spec_id.push(item.info.spec_id[0]||'')
					goods_num.push(item.info.goods_num[0])
					goods_price.push(item.info.unit_price)
				})
				console.log(goods_id,spec_id)
				if(!this.fd){
					this.fd = true
					this.$http({
						url:'api/wechat/createSysOrder',
						data:{
							token:uni.getStorageSync('token'),
							goods_id:goods_id,
							delivery_method:this.typelist[this.delivery_method].id,//配送方式 1快递 2自提
							address_id:this.address_id==''?'':this.order[0].id,
							spec_id:spec_id,
							goods_num:goods_num,
							goods_price:goods_price,
							order_pay_money:this.totalPrice, //(this.totalPrice * 100 + this.freight_money * 100) /100
							order_total_money:(this.finalpaymoney*100+this.freight_money*100)/100,
							order_type:3,//1商品购买订单 2到店支付 3外卖订单
							coupon_id:this.coupon_id,
							pay_type:this.typeindex,//1积分支付 2微信支付  3POS余额支付 4账户余额支付
							freight_money:this.freight_money,
							uu_id:this.uu_id,
						}
					}).then(res=>{
						setTimeout(()=>{
							this.fd = false
						},2500)
						this.order_id = res.data
						if(this.typeindex==3||this.typeindex==4){
							this.balancepay(this.order_id)
						}else{
							this.wechatPay(this.order_id)
						}
					})
				}
			},
			//余额支付接口
			balancepay(orderid){
				this.$http({
					url:'api/wechat/balancePay',
					data:{
						orderid:orderid,
						pay_type:this.typeindex
					}
				}).then(res=>{
					uni.showToast({
						title: '支付成功',
						icon: 'none'
					})
					setTimeout(()=>{
						console.log(this.delivery_method,'this.delivery_method')
						uni.reLaunch({
							// url:'/pages/orderGoods/orderGoods?type='+(5)+'&currindex=' + this.delivery_method
							//order_type 1 商品购买订单  2到店支付订单  3外卖订单
							url:'/pages/success/success?type='+(1)+'&order_type='+(3)///0==物流订单，1==自提订单
						})
						// uni.reLaunch({
						// 	// url:'/pages/orderGoods/orderGoods?type='+(5)+'&currindex=' + this.delivery_method
						// 	//order_type 1 商品购买订单  2到店支付订单  3外卖订单
						// 	url:'/pageshop/goodsorder/goodsorder?type='+(1)+'&order_type='+(3)///0==物流订单，1==自提订单
						// })
					},1000)
				})
			},
			// 获取微信支付参数
			async wechatPay(orderid) {
				const {data} = await this.$http({
					url: 'api/lklpay/orderPay',//api/wxpay/storeOrderPay
					data: {
						orderid
					},
				})
				let that = this
				console.log(data,'data')
				uni.requestPayment({
					timeStamp: data.rows.timestamp,
					nonceStr: data.rows.nonce_str,
					package: data.rows.package,
					signType: "RSA",
					paySign: data.rows.pay_sign,
					// prepay_id:data.rows.prepay_id,
					success: function(res) {
						uni.showToast({
							title: '支付成功',
							icon: 'none'
						})
						setTimeout(()=>{
							console.log(that.delivery_method,'this.delivery_method')
							uni.reLaunch({
								// url:'/pages/orderGoods/orderGoods?type='+(5)+'&currindex=' + this.delivery_method
								//order_type 1 商品购买订单  2到店支付订单  3外卖订单
								url:'/pages/success/success?type='+(1)+'&order_type='+(3)///0==物流订单，1==自提订单
							})
							// uni.reLaunch({
							// 	// url:'/pages/orderGoods/orderGoods?type='+(5)+'&currindex=' + this.delivery_method
							// 	//order_type 1 商品购买订单  2到店支付订单  3外卖订单
							// 	url:'/pageshop/goodsorder/goodsorder?type='+(1)+'&order_type='+(3)///0==物流订单，1==自提订单
							// })
						},1000)
					},
					fail: function(res) {
						console.log(res,'res')
						uni.showToast({
							title: '支付失败',
							icon: 'none'
						})
					},
				})
				
			},
			// 自提二维码按钮
			showEwm() {
				this.isShowEwm = true
			},
			//自提
			deliverymethod(result){
				this.seftpick = result
				this.delivery_method = 1
				this.freight_money=0
				console.log(this.seftpick,this.delivery_method,'this.delivery_method')
				this.close()
			},
			getseltpickup(){
				this.$http({
					url:'api/wechat/pickSite'
				}).then(res=>{
					this.seftpick = res.data
				})
			},
			//选择地址pickSite
			open(n) {
				this.modelindex = n
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup.open('bottom')
			},
			close() {
				this.$refs.popup.close()
			},
			//获取地址
			getaddress(){
				this.$http({
					url:'api/Wechat/addressList',
					data:{
						token:uni.getStorageSync('token'),
					}
				}).then(res=>{
					this.addresslist = res.data
					 // const a= this.addresslist.findIndex(item => item.isdefault==1)
					 // this.address_id = this.addresslist[a].id
					 // console.log(this.address_id,a)
				})
			},
			//快递
			addressid(result){
				this.address_id = result
				this.order = this.addresslist.filter(item => item.id==this.address_id)
				console.log(this.address_id,this.order)
				this.delivery_method = 0
				this.getfee()
				this.close()
			},
			//获取优惠卷
			getcouopn(){
			console.log(this.orderlist,'list')
			this.goods_ids = []
			this.goods_ids = this.orderlist.map(item=>item =  item.id)
			console.log(this.goods_ids,'goods_ids',this.goods_ids.join(','))
				this.$http({
					url:'api/Wechat/getCouponByOrder',
					data:{
						order_money:this.totalPrice,
						type:2,//1商城下单 2外卖下单 3停车场 4商户
						goods_ids:this.goods_ids.join(','),
						merch_id:'',
					}
				}).then(res=>{
					this.couponlist = res.data
					this.couponlong = res.data.length
				})
			},
			//选择支付类型
			handlepay(item){
				this.typeindex = item.id
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page_1 {
		padding-bottom: 132rpx;
	}

	// 顶部状态
	.top_box {
		width: 750rpx;
		height: 107rpx;
		background: #FFFFFF;
		border-radius: 0rpx 0rpx 10rpx 10rpx;
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		gap: 0 26rpx;

		.bj {
			width: 154rpx;
			height: 52rpx;
			background-image: url('https://shex.app65.cn/img/a2.png');
			background-size: 100%;
			font-size: 32rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 1em;
			display: flex;
			align-items: center;
			flex-shrink: 0;

			text {
				margin-left: 20rpx;
			}
		}

		.describe {
			font-size: 28rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;
			color: #F94D29;
		}
	}

	// 收货地址
	.address_box {
		width: 750rpx;
		height: 149rpx;
		background: #FFFFFF;
		border-radius: 0rpx 0rpx 10rpx 10rpx;
		padding: 34rpx 30rpx;
		display: flex;
		align-items: center;
		box-sizing: border-box;
		gap: 0 20rpx;
		margin-top: 16rpx;
		position: relative;

		.address_bj {
			position: absolute;
			width: 100%;
			height: 14rpx;
			bottom: 0;
			left: 0;
		}

		image {
			width: 60rpx;
			height: 60rpx;
			flex-shrink: 0;
		}

		.text {
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.user_info {
				display: flex;
				align-items: center;
				gap: 0 20rpx;
				font-size: 32rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #222222;
				line-height: 1em;
				.namebox{
					max-width: 300rpx;
					-webkit-line-clamp: 1;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}

			.address {
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #555555;
				line-height: 1em;
				-webkit-line-clamp: 1;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}
	}

	// 门店自提信息
	.store_box {
		margin-top: 16rpx;
		width: 750rpx;
		height: 150rpx;
		background: #FFFFFF;
		border-radius: 0rpx 0rpx 10rpx 10rpx;
		padding: 30rpx 30rpx 0 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: space-between;

		.top {
			height: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding-bottom: 30rpx;
			box-sizing: border-box;
			gap: 0 24rpx;

			image {
				width: 23rpx;
				height: 26rpx;
				flex-shrink: 0;
			}

			.text {
				height: 100%;
				width: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;


				.store_info {
					font-size: 32rpx;
					font-family: Source Han Sans CN-Regular, Source Han Sans CN;
					font-weight: 400;
					color: #222222;
					line-height: 1em;
					display: flex;
					gap: 0 20rpx;
				}

				.address {
					font-size: 28rpx;
					font-family: Source Han Sans CN-Regular, Source Han Sans CN;
					font-weight: 400;
					color: #555555;
					line-height: 1em;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
			}
		}

		.line {
			flex-shrink: 0;
			width: 100%;
			background: #FFFFFF;
			border: 2rpx solid #ECECEC;
		}

		.time_btn {
			flex-shrink: 0;
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.tiem {
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #555555;
			}

			.btn {
				width: 184rpx;
				height: 64rpx;
				border-radius: 31rpx 31rpx 31rpx 31rpx;
				border: 2rpx solid #888888;
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #222222;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}

	}

	// 	商品信息
	.goods_status {
		width: 750rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		margin-top: 20rpx;
		padding: 38rpx 32rpx 24rpx 28rpx;
		box-sizing: border-box;


		.number {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.left {
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #222222;

				:first-child {
					color: #555555;
				}
			}

			.right {
				font-size: 28rpx;
				font-family: Source Han Sans CN-Medium, Source Han Sans CN;
				font-weight: 500;
				color: #F94D29;
			}
		}

		.info {
			height: 160rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 36rpx;
			gap: 0 28rpx;

			image {
				width: 160rpx;
				height: 160rpx;
				min-width: 160rpx;
				background: #FFFFFF;
				border-radius: 6rpx 6rpx 6rpx 6rpx;
				flex-shrink: 0;
			}

			.title {
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;
				flex: 1;

				.title_item {
					display: flex;
					justify-content: space-between;
					align-items: flex-start;
					gap: 0 58rpx;

					.title_left {
						font-size: 30rpx;
						font-family: Source Han Sans CN-Medium, Source Han Sans CN;
						font-weight: 500;
						color: #222222;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 2;
						-webkit-box-orient: vertical;
						line-height: 1em;
					}

					.title_right {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						align-items: flex-end;

						:first-child {
							font-size: 28rpx;
							font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;
							font-weight: normal;
							color: #222222;
							line-height: 1em;
						}

						:last-child {
							font-size: 24rpx;
							font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
							font-weight: normal;
							color: #555555;
							line-height: 1em;
							margin-top: 20rpx;
						}
					}
				}

				.small_title {
					font-size: 26rpx;
					font-family: Source Han Sans CN-Regular, Source Han Sans CN;
					font-weight: 400;
					color: #555555;
					display: flex;
					flex-wrap: wrap;
					>text{
						margin-right: 5rpx;
					}
					// line-height: 1em;
				}
			}
		}

		.price {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 48rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;
			color: #555555;

			.tipname {
				width: 70%;
				text-align: right;
			}
		}
	}

	// 订单信息
	.order_info {
		width: 690rpx;
		height: 190rpx;
		background: #FFFFFF;
		border-radius: 14px 14px 14px 14px;
		padding: 0 30rpx;
		margin: 24rpx 0;
		.flex{
			height: 95rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left{
				font-size: 28rpx;
				font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
				font-weight: normal;
				color: #555555;
			}
			.right{
				font-size: 28rpx;
				font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
				font-weight: normal;
				color: #222222;
				display: flex;
				align-items: center;
				image{
					width: 13rpx;
					height: 20rpx;
					margin-left: 10rpx;
				}
				.rollup{
					width: fit-content;
					padding: 0 14rpx;
					height: 44rpx;
					line-height: 44rpx;
					font-size: 26rpx;
					font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
					font-weight: normal;
					color: #FFFFFF;
					background: #F94D29;
					border-radius: 8rpx ;
				}
			}
			
		}
	}
	//支付信息
	.paybox{
		width: 690rpx;
		// height: 302rpx;
		background: #FFFFFF;
		border-radius: 14rpx;
		padding:40rpx 30rpx 0 30rpx;
		.titlebox{
			// height: 108rpx;
			margin:0  0 40rpx 0;
			width: 112rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #222222;
			background: linear-gradient(180deg, #FFF 80%, #ffedea 100%);
		}
		.paylist{
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			image{
				width: 40rpx;
				height: 40rpx;
			}
			.right{
				display: flex;
				align-items: center;
				font-size: 28rpx;
				font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
				font-weight: normal;
				color: #222222;
				image{
					width: 46rpx;
					height: 46rpx;
					margin-right: 20rpx;
				}
			}
		}
	}
	

	// .down_box-placeholder {
	// 	padding-bottom: env(safe-area-inset-bottom);
	// }

	// 底部按钮
	.down_box {
		width: 100%;
		bottom: 0;
		position: fixed;
		height: 110rpx;
		background: #FFFFFF;
		display: flex;
		justify-content: space-between;
		align-items: center;
		z-index: 9;
		.total{
			margin-left: 30rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;
			color: #222222;
			>text{
				color: #FF4A12;
				font-size: 28rpx;
			}
		}
		.btn {
			width: 228rpx;
			height: 84rpx;
			background: linear-gradient(360deg, #F99529 0%, #F94D29 100%);
			border-radius: 83rpx 83rpx 83rpx 83rpx;
			opacity: 1;
			text-align: center;
			line-height: 84rpx;
			font-size: 32rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #FFFFFF;
			margin-right: 30rpx;
		}
	}

	// 遮罩层
	.zzc {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		width: 100vw;
		background-color: #000;
		opacity: .6;
	}

	// 隐藏的二维码
	.hide_ewm {
		width: 607rpx;
		height: 727rpx;
		background: #FFFFFF;
		border-radius: 14rpx;
		padding: 0 70rpx 38rpx 70rpx;
		box-sizing: border-box;
		position: fixed;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;

		.shut {
			position: absolute;
			width: 40rpx;
			height: 40rpx;
			top: 46rpx;
			right: 32rpx;
		}

		.title_box {
			height: 128rpx;
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 33rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;
			color: #222222;
		}

		.line {
			width: 100%;
			height: 2rpx;
			background: #EEEEEE;
		}

		.ewm {
			width: 426rpx;
			height: 426rpx;
		}

		.number {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 0 24rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;

			:first-child {
				color: #666666;
			}

			:last-child {
				color: #333333;
			}
		}
	}
</style>
